package flc.ast.widget.calendar;

import android.annotation.SuppressLint;
import android.appwidget.AppWidgetManager;
import android.content.Context;
import android.widget.RemoteViews;

import flc.ast.R;
import flc.ast.utils.BatteryUtil;

public class Calendar8Widget extends BaseCalendarWidget {

    public Calendar8Widget(int appWidgetId) {
        super(appWidgetId);
    }

    @Override
    protected void onUpdate(Context context) {
        @SuppressLint("RemoteViewLayout") RemoteViews remoteViews =
                new RemoteViews(context.getPackageName(), R.layout.widget_calendar8);
        BatteryUtil.ReceiverBatteryOtherInfo(context);
        remoteViews.setTextViewText(R.id.tvNum, BatteryUtil.level + "%");

        AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteViews);
    }
}
